A chi squared (χ2) test is used to check whether two discrete variables are related based on the values in their contingency table, which records the relative frequency of each pair of values. If the varables are independent then we would expect that the frequency in each cell would be the product of the relative frequencies of the two variable values for that cell. For example, if 30% of the sample is male and 20% are novices, then we would expect 6% to be male and novice. Given observed (Oi) and expected (Ei) values for each cell, a measure of the difference is the sum:
Σ (Ei − Oi)2 / Ei
This sum has a chi squared distribution, hence the name of the test.
Used in Chap. 13: page 150
Used in glossary entries: chi-squared distribution, contingency table
